package zuoye;

public class F3 {
	public static void main(String[] args){
		for(int num=2;num<1000;num++) {
			int sum=0;
			for(int a=1;a<=num/2;a++ ) {
				if(num%a==0)  sum+=a;
			}
		if(sum==num) System.out.println(num);
		}
	}
}
